package config;

import Bean.User;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class UserBeanConfig {
//        @Bean("u1")
//    @Bean
    public User getUser1() {
        return new User("张三丰", 120);
    }

//        @Bean("u2")
//    @Bean
    public User getUser2() {
        return new User("张无忌", 24);
    }

    @Bean
    public User defaultUser() {
        return new User();
    }
}
